<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:define name="title">
	<h:outputText value="#{lang.NEW_COLLABORATOR}" />
</ui:define>

<body>
	<ui:composition template="layout.xhtml">
		<ui:define name="menuHeader">
			<h:outputText value="#{lang.ADMINISTRATION}" />
		</ui:define>
		<ui:define name="menuBody">
			<ui:include src="adminMenu.xhtml"></ui:include>
		</ui:define>
		<ui:define name="contentHeader">
			<h:outputText value="#{lang.NEW_COLLABORATOR}" />
		</ui:define>
		<ui:define name="contentBody">
			<f:metadata>
				<f:viewParam name="id" value="#{projectsBean.id}" required="true" />
			</f:metadata>
			<h:form>
			<fieldset class="collab-fieldset">
					<table class="data-grid" cellpadding="0" cellspacing="12"
						border="0" width="500">
						<tr>
							<td class="auth-label" width="200"><h:outputText
									value="#{lang.NAME}" /></td>
							<td align="left"><p:inputText id="name" styleClass="fields"
									value="#{projectsBean.selectedProject.name}" required="true">
								</p:inputText> <h:message for="name" /></td>
						</tr>
						<tr>
							<td class="auth-label" width="200"><h:outputText
									value="#{lang.MANAGER}" /></td>
							<td align="left" width="200"><p:autoComplete id="manager"
									styleClass="fields" value="#{projectsBean.selectedProject.manager}"
									required="true" completeMethod="#{projectBean.completeManager}"
									var="mng" itemLabel="#{mng.firstName} #{mng.lastName}"
									itemValue="#{mng.das}" converter="collaboratorConverter" /> <p:message
									for="manager" /></td>
						</tr>
						<tr>
							<td class="auth-label" width="200"><h:outputText
									value="#{lang.PROJECTMANAGER}" /></td>
							<td align="left" width="200"><p:autoComplete id="pmaneger"
									styleClass="fields"
									value="#{projectsBean.selectedProject.projectManager}"
									required="true"
									completeMethod="#{projectBean.completeProjectManager}"
									var="pmng" itemLabel="#{pmng.firstName} #{pmng.lastName}"
									itemValue="#{pmng.das}" converter="pcollaboratorConverter"
									forceSelection="true" /> <p:message for="pmaneger" /></td>
						</tr>
						<tr>
							<td><br /></td>
							<td></td>
						</tr>
						<tr>
							<td colspan="2"><p:pickList
									value="#{projectsBean.collaborators}" var="col"
									itemLabel="#{col}" itemValue="#{col.das}"
									converter="collaboratorConverter">
									<p:column> #{col.firstName} #{col.lastName} </p:column>
								</p:pickList></td>
							<td></td>
						</tr>
						<tr>
							<td colspan="2"><h:commandButton value="#{lang.SAVE}"
									action="#{projectsBean.updateProject()}"></h:commandButton> <h:commandButton
									value="#{lang.CANCEL}" onclick="history.go(-1)"></h:commandButton></td>
						</tr>
					</table>
				</fieldset>
			</h:form>
			<p:dialog id="dlg">
				
			</p:dialog>
			<br />
			<br />
			<br />
			<br />
		</ui:define>

	</ui:composition>
</body>
</html>